//
//  LoginView.m
//  ITHome
//
//  Created by lanou3g on 15/7/20.
//  Copyright (c) 2015年 YAX. All rights reserved.
//

#import "LoginView.h"

@implementation LoginView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self loginView];
    }
    return self;
}

- (void)loginView
{
    //背景图
    self.backImageView = [[UIImageView alloc] initWithFrame:self.bounds];
    self.backImageView.image = [UIImage imageNamed:@"杨戬1"];
    [self addSubview:_backImageView];
    
    
    // QQ登陆
    self.qqButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.qqButton itemWithTitle:@"QQ登录" image:@"share_platform_qqfriends" highImage:@"share_platform_qqfriends" titleSize:15];
    self.qqButton.frame = CGRectMake(50, kScreenHeight / 2, kScreenWidth - 100, 50);
    [self.qqButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self addSubview:_qqButton];
    
    //
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(50, _qqButton.y - 30, kScreenWidth - 100, 20)];
    label.text = @"可以选择以下方式登入";
    label.font = [UIFont systemFontOfSize:10];
    label.backgroundColor = [UIColor whiteColor];
    label.textColor = [UIColor RGBColor:140 green:140 blue:140 alpha:1];
    label.textAlignment = NSTextAlignmentCenter;
   
    UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, label.y + 10, kScreenWidth, 1)];
    lineView.backgroundColor = [UIColor RGBColor:140 green:140 blue:140 alpha:1];
    [self addSubview:lineView];
    [self addSubview:label];
    // 微博登陆
    self.sinaButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.sinaButton itemWithTitle:@"微博登陆" image:@"share_platform_sina" highImage:@"share_platform_sina" titleSize:15];
    self.sinaButton.frame = CGRectMake(50, _qqButton.y + _qqButton.height + 10, kScreenWidth - 100, 50);
    [self.sinaButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];

    [self addSubview:_sinaButton];

    UILabel *lastLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth/2 + 30, kScreenHeight - 64 - 30 , 150, 20)];
    lastLabel.textAlignment = NSTextAlignmentCenter;
    lastLabel.font = [UIFont systemFontOfSize:10];
    lastLabel.textColor = [UIColor RGBColor:140 green:140 blue:140 alpha:1];
    lastLabel.text = @"你没有其他方式登录了！";
    [self addSubview:lastLabel];
}



@end
